using System.Text.Json.Serialization;

namespace Crux.Core.Payloads;
/// <summary>
/// Result
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum Result
{
    /// <summary>
    /// 成功
    /// </summary>
    Success = 1,
    /// <summary>
    /// 错误
    /// </summary>
    Error = 0,
    /// <summary>
    /// 无权限
    /// </summary>
    Unauthorized = -1,
    /// <summary>
    /// 异常
    /// </summary>
    Exception = -2,
    /// <summary>
    /// 禁止访问
    /// </summary>
    Forbidden = -3,
    /// <summary>
    /// 资源不存在
    /// </summary>
    NotFound = -4,
    /// <summary>
    /// 冲突
    /// </summary>
    Conflict = -5,
    /// <summary>
    /// 资源锁定
    /// </summary>
    Locked = -6,
    /// <summary>
    /// 服务器异常
    /// </summary>
    InternalServerError = -7
}